FactorInteger
FactorInteger[n] gives a list of the prime factors of the integer n, together with their exponents.
FactorInteger[n,k] does partial factorization, pulling out at most k distinct factors.
Please visit the official Wolfram Language Reference for more details and examples on core symbols.